package com.stylefeng.guns.modular.computer.service.impl;

import com.stylefeng.guns.common.persistence.model.Computer;
import com.stylefeng.guns.common.persistence.model.ComputerType;
import com.stylefeng.guns.modular.computer.dao.ComputerDao;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import com.stylefeng.guns.modular.computer.service.IComputerService;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * computerDao
 *
 * @author fengshuonan
 * @Date 2019-07-10 16:57:43
 */
@Service
public class ComputerServiceImpl implements IComputerService {

    @Resource
    private ComputerDao computerDao;


    @Override
    public List<Map<String, Object>> selectComputer(String condition) {
        return computerDao.selectComputer(condition);
    }

    @Override
    public int addComputer(Computer computer) {
        return computerDao.addComputer(computer);
    }

    @Override
    public int updateComputer(Computer computer) {
        return computerDao.updateComputer(computer);
    }

    @Override
    public List<ComputerType> search(@Param("name")String name) {
        return computerDao.search(name);
    }


}
